{temp('kefu/head')}
</head>
<body>
<nav class="breadcrumb">
	<i class="Hui-iconfont">&#xe67f;</i>首页
	<span class="c-gray en">&gt;</span>用户管理
	<span class="c-gray en">&gt;</span>企业列表
	<a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
		<i class="Hui-iconfont">&#xe68f;</i>
	</a>
</nav>
<div style="color:red;text-align: right;">
	重置为将用户密码重置为“111111”。
</div>
<div class="pd-20">
	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort">
			<thead>
				<tr class="text-c">
					<th width="80">ID</th>
					<th>用户名</th>
					<th width="150">上次登录时间</th>
					<th width="150">注册时间</th>
					<th width="200">操作</th>
				</tr>
			</thead>
			<tbody>
			{if(@$rs)}
				{foreach($rs as $k=>$v)}
				<tr class="text-c">
					<td>{$v['id']}</td>
					<td class="text-l">
						<span class="text-primary">
						{$v['name']}
						</span>
					</td>
					<td>{code(echo date('Y-m-d H:i:s',$v['dltime']))}</td>
					<td>{code(echo date('Y-m-d H:i:s',$v['time']))}</td>
					<td class="f-14 td-manage">
						<!-- <button onclick="article_edit('查看企业信息','{$_url}/kefu/?act=user&met=qy_xx&id={$v['id']}',{$v['id']})" style="border:0px;color:#ffffff;background-color:#40bbea;padding:4px 8px;cursor:pointer;">
							查看
						</button> -->
						
						<button onclick="article_edit('编辑企业信息','{$_url}/kefu/?act=user&met=qy_xiu&id={$v['id']}',{$v['id']})" style="border:0px;color:#ffffff;background-color:#68b828;padding:4px 8px;cursor:pointer;margin-left:15px;">
							编辑
						</button>
						
						<button onclick="czmm({$v['id']})" style="border:0px;color:#ffffff;background-color:#E74848;padding:4px 8px;cursor:pointer;margin-left:15px;">
							重置密码
						</button>
						
						<button onclick="member_add('充值','{$_url}/kefu/?act=user&met=qy_cz&id={$v['id']}','260','200')" style="border:0px;color:#ffffff;background-color:#29A2BE;padding:4px 8px;cursor:pointer;margin-left:15px;">
							充值
						</button>
					</td>
				</tr>
				{/foreach}
			{/if}
			</tbody>
		</table>
	</div>
</div>
<script type="text/javascript">
$('.table-sort').dataTable({
	"aaSorting": [[ 1, "desc" ]],//默认第几个排序
	"bStateSave": true,//状态保存
});

/*新闻-编辑*/
function article_edit(title,url,id,w,h){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}

function member_add(title,url,w,h){
	layer_show(title,url,w,h);
}

function czmm(id){
	$.post('{$_url}/kefu/?act=user&met=qy_czmm',{id:id},function(data){
		if(data == 'cg'){
			alert('重置成功');
		}else if(data == 'error'){
			alert('重置失败');
		}
	});
}
</script>
{temp('kefu/foot')}
</body>
</html>